﻿using Foundation.Entity;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace Dyao.Book.Entity
{
    [Table("Bookshelf")]
    public class BookshelfEntity : IEntity<string>, ICreateOn
    {
        /// <summary>
        /// ID
        /// </summary>
        [Required]
        [Column("Id", TypeName = "VARCHAR")]
        [Key]
        public string ID { get; set; }

        /// <summary>
        /// 用户编号
        /// </summary>
        public string UserId { get; set; }

        /// <summary>
        /// 书籍编号
        /// </summary>
        public string BookId { get; set; }

        /// <summary>
        /// 书籍名称
        /// </summary>
        public string BookName { get; set; }

        /// <summary>
        /// 最后章节
        /// </summary>
        public string? LastReadingChapterId { get; set; }

        /// <summary>
        /// 最后阅读时间
        /// </summary>
        public DateTime? LastReadingDateTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Required]
        public DateTime CreateDateTime { get; set; }
    }
}
